package indi.zhifa.study2025.test.rabbitmq.rpc.s1.controller;

import indi.zhifa.engine.core.common.web.ann.ZhiFaRestController;
import indi.zhifa.study2025.test.rabbitmq.common.entity.FabRequest;
import indi.zhifa.study2025.test.rabbitmq.rpc.s1.service.IFabRpcService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.IOException;

@Tag(name = "rpc测试")
@RequiredArgsConstructor
@ZhiFaRestController
@RequestMapping("/api/test/rpc")
public class RpcTestController {

    final IFabRpcService mFabRpcService;

    @PostMapping("/fab")
    public Double Fab(@RequestBody FabRequest pFabRequest) throws IOException {
        return mFabRpcService.Fab(pFabRequest);
    }

}
